$(function(){
	var url = "/person/postFeedBack";
	$('#submit').click(function () {
		var txt = $('#txt').val();
		if (txt == ''){
			$.toast('输入的内容不能为空');
		}else {
			var postUrl = url+"?suggestion="+txt;
			$.ajax({
                url:postUrl,
                type:'post',
                contentType:false,
                processData:false,
                cache:false,
                beforeSend: function(request){
                    request.setRequestHeader("Token",localStorage.getItem('token'));
                },
				success: function (data) {
					$.toast(data.message);
					if (data.success) {
                        $('#txt').val("");
					}
                }
			});
		}
    });

});
